﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace HZ.Supervise.Web.Secondphase.ReportCompany
{
    public partial class CompanyBidDateInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BindList();
        }
        void BindList()
        {
            DataTable dt = new DataTable();
            DataColumn dc1 = new DataColumn("hospital", typeof(string)); dt.Columns.Add(dc1);
            DataColumn dc2 = new DataColumn("PurchaseNumerbTotalc_jb", typeof(string)); dt.Columns.Add(dc2);
            DataColumn dc3 = new DataColumn("PurchaseNumerbTotalc_fjb", typeof(string)); dt.Columns.Add(dc3);
            DataColumn dc4 = new DataColumn("PurchaseAmountTotal_jb", typeof(string)); dt.Columns.Add(dc4);
            DataColumn dc5 = new DataColumn("PurchaseAmountTotal_fjb", typeof(string)); dt.Columns.Add(dc5);
            DataColumn dc6 = new DataColumn("jiyao", typeof(string)); dt.Columns.Add(dc6);
            for (int i = 0; i < 24; i++)
            {
                DataRow dr = dt.NewRow();
                dr[0] = "昆明地市" + i.ToString();
                dr[1] = "1000";
                dr[2] = "300";
                dr[3] = "600";
                dr[4] = "90000.000";
                if (i % 2 == 0)
                {
                    dr[5] = "基药";
                }
                else
                {
                    dr[5] = "非基药";
                }
                dt.Rows.Add(dr);

            }
            gvwDateInfo.DataSource = dt;
            gvwDateInfo.DataBind();
            for (int j = 0; j < gvwDateInfo.Rows.Count; j++)
            {
                gvwDateInfo.Rows[j].Cells[0].RowSpan = 2;
                //gvwDateInfo.Rows[j].Cells[6].RowSpan = 2;
                gvwDateInfo.Rows[j + 1].Cells[0].Visible = false;
                gvwDateInfo.Rows[j].Cells[7].RowSpan = 2;
                gvwDateInfo.Rows[j + 1].Cells[7].Visible = false;
                j++;
            }
            gvwDateInfo.Rows[0].Cells[0].Text = "1月";
            gvwDateInfo.Rows[2].Cells[0].Text = "2月";
            gvwDateInfo.Rows[4].Cells[0].Text = "3月";
            gvwDateInfo.Rows[6].Cells[0].Text = "4月";
            gvwDateInfo.Rows[8].Cells[0].Text = "5月";
            gvwDateInfo.Rows[10].Cells[0].Text = "6月";
            gvwDateInfo.Rows[12].Cells[0].Text = "7月";
            gvwDateInfo.Rows[14].Cells[0].Text = "8月";
            gvwDateInfo.Rows[16].Cells[0].Text = "9月";
            gvwDateInfo.Rows[18].Cells[0].Text = "10月";
            gvwDateInfo.Rows[20].Cells[0].Text = "11月";
            gvwDateInfo.Rows[22].Cells[0].Text = "12月";
        }
    }
}
